package com.luyuan.gallery.service.impl;

import java.util.List;
import com.luyuan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luyuan.gallery.mapper.ExhiLikeCountsMapper;
import com.luyuan.gallery.domain.ExhiLikeCounts;
import com.luyuan.gallery.service.IExhiLikeCountsService;

/**
 * 点赞计数Service业务层处理
 * 
 * @author luyuan
 * @date 2025-11-19
 */
@Service
public class ExhiLikeCountsServiceImpl implements IExhiLikeCountsService {
    @Autowired
    private ExhiLikeCountsMapper exhiLikeCountsMapper;

    /**
     * 查询点赞计数
     * 
     * @param id 点赞计数主键
     * @return 点赞计数
     */
    @Override
    public ExhiLikeCounts selectExhiLikeCountsById(Long id) {
        return exhiLikeCountsMapper.selectExhiLikeCountsById(id);
    }

    /**
     * 查询点赞计数列表
     * 
     * @param exhiLikeCounts 点赞计数
     * @return 点赞计数
     */
    @Override
    public List<ExhiLikeCounts> selectExhiLikeCountsList(ExhiLikeCounts exhiLikeCounts) {
        return exhiLikeCountsMapper.selectExhiLikeCountsList(exhiLikeCounts);
    }

    /**
     * 新增点赞计数
     * 
     * @param exhiLikeCounts 点赞计数
     * @return 结果
     */
    @Override
    public int insertExhiLikeCounts(ExhiLikeCounts exhiLikeCounts) {
        exhiLikeCounts.setCreateTime(DateUtils.getNowDate());
        return exhiLikeCountsMapper.insertExhiLikeCounts(exhiLikeCounts);
    }

    /**
     * 修改点赞计数
     * 
     * @param exhiLikeCounts 点赞计数
     * @return 结果
     */
    @Override
    public int updateExhiLikeCounts(ExhiLikeCounts exhiLikeCounts) {
        exhiLikeCounts.setUpdateTime(DateUtils.getNowDate());
        return exhiLikeCountsMapper.updateExhiLikeCounts(exhiLikeCounts);
    }

    /**
     * 批量删除点赞计数
     * 
     * @param ids 需要删除的点赞计数主键
     * @return 结果
     */
    @Override
    public int deleteExhiLikeCountsByIds(Long[] ids) {
        return exhiLikeCountsMapper.deleteExhiLikeCountsByIds(ids);
    }

    /**
     * 删除点赞计数信息
     * 
     * @param id 点赞计数主键
     * @return 结果
     */
    @Override
    public int deleteExhiLikeCountsById(Long id) {
        return exhiLikeCountsMapper.deleteExhiLikeCountsById(id);
    }
}
